package org.example.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.service.TrService;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;

public class TrServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<M, T> implements TrService<T> {


    public boolean removeByIds(Long userId, Collection<? extends Serializable> idList) {

        UpdateWrapper<T> update = new UpdateWrapper<>();
        update.in("id", idList);
        
        
        
        update.set("update_id", userId);
        update.set("update_time",new Date());

        return super.update(update);
    }

}
